# Maintainer: Christian Hesse <mail@eworm.de>

pkgname=lib2geom
pkgver=1.1
pkgrel=1
pkgdesc='Easy to use 2D geometry library in C++'
arch=('x86_64')
url='https://gitlab.com/inkscape/lib2geom'
license=('GPL')
depends=('glib2' 'gsl' 'double-conversion' 'cairo' 'ragel' 'gtest')
makedepends=('cmake' 'boost')
source=("https://gitlab.com/inkscape/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('543c643aa197630b04ca23aeaaa8436d68343232eb40bcc12e07379b5ba1f524')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  mkdir -p build
  cd build
  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -D2GEOM_BOOST_PYTHON=NO \
    -D2GEOM_BUILD_SHARED=YES \
    -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}/build/"

  make DESTDIR="${pkgdir}/" install
}
